<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
<title>{block name="title"}后台管理系统{/block}</title>
<link rel="stylesheet" href="__STATIC__/public/awesome/css/font-awesome.min.css" />

<link rel="stylesheet" href="__STATIC__/public/layui/css/layui.css" />

<link rel="stylesheet" href="__STATIC__/public/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="__STATIC__/manage/css/style.css" />
<script src="__STATIC__/public/kindeditor/kindeditor-all.js"></script>
<script src="__STATIC__/public/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
{if condition="$is_auth"}
{block name="content"}{/block}
{/if}
<input type="hidden" name="action_uri" value="{:url('action')}" />

<input type="hidden" name="redirect_uri" value="{$url}" />

<input type="hidden" name="region_uri" value="/shop/regions/regions" />
<script src="__STATIC__/public/js/jquery-1.10.2.js"></script>
<script src="__STATIC__/public/js/maniac.ui.js"></script>
<script src="__STATIC__/public/layui/layui.js" charset="utf-8"></script>
<script src="__STATIC__/public/js/aes.js"></script>
<script src="__STATIC__/public/js/mode-ecb-min.js"></script>
<script src="__STATIC__/public/js/utils.js"></script>
<script src="__STATIC__/public/js/dialog.js"></script>
<script src="__STATIC__/manage/js/form.js"></script>
<script src="__STATIC__/manage/js/js.js"></script>
<script src="__STATIC__/public/js/app.js"></script>
<script src="__STATIC__/public/js/encrypt.js"></script>

<script>
var aesKey = '{$encrypt_key}';
    $(function(){
        layui.use('layer', function(){
            var user_exists = parseInt('{$user_exists ? 1 : 0}');
            var user_forbidden = parseInt('{$user_forbidden ? 1 : 0}');
            var quit_force = parseInt('{$quit_force ? 1 : 0}');
            var is_auth    = parseInt('{$is_auth ? 1 : 0}');
            
            if (user_exists) {
                dialog.error('您所登录的用户已被删除', function(){
                	top.location.href = '/shop';
                    return false;
                });
            }
            
            if (user_forbidden) {
                dialog.error('您的账户已被禁用', function(){
                	top.location.href = '/shop';
                    return false;
                });
            }

            if (quit_force) {
                dialog.error('同一账户同一时间只能一人在线', function(){
                	top.location.href = '/shop';
                    return false;
                });
            }
            
            if (!is_auth) {
                dialog.error('您没有权限执行此操作', function(){
                    window.location.href = history.go(-1);
                    return false;
                });
            }
        });
    })
</script>
{block name="extrajs"}{/block}
</body>
</html>
